function getElementsByClassName ( parent, tagName, className) {
	var aTag = parent.getElementsByTagName(tagName);
	var arr = [];

	for (var i = 0; i < aTag.length; i++) {
		var arrClassName = aTag[i].className.split(' ');

		for (var j = 0; j < arrClassName.length; j++) {
			if( arrClassName[j] == className ){
				arr.push( aTag[i] );
				break;		//找到就跳出当前for循环，目的是避免class="box box"情况
			}
		};
	};
	return arr;
}